package cn.sangkf.litemall.common.valid.annoation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.PARAMETER;

/**
 * @author : sangkf
 * @package : cn.sangkf.litemall.common.valid.ListValues
 * @date : 2020/12/26 下午9:39 星期六
 * @description : TODO 列表值校验
 * @version: 1.0
 * <p>Copyright: Copyright (c) 2020</p>
 */
@Documented
@Constraint(validatedBy = {ListValuesConstraintValidator.class})
@Target({FIELD, METHOD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface ListValues {

    String message() default "{cn.sangkf.litemall.common.valid.annoation.ListValues.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    int[] values();
}
